package model.contents;

import model.Settings;
public enum ContentType {

	IMAGE, TEXT, VIDEO, HTML, TABLE, MIXED, GIF, OTHER, REALESTATE_LISTING,WEATHER,BROWSER;

	public static ContentType getContentType(String content) {
		if (content.equalsIgnoreCase(ContentType.IMAGE.toString())) {
			return ContentType.IMAGE;
		}
		if (content.equalsIgnoreCase(ContentType.WEATHER.toString())) {
			return ContentType.WEATHER;
		}
		if (content.equalsIgnoreCase(ContentType.TEXT.toString())) {
			return ContentType.TEXT;
		}
		if (content.equalsIgnoreCase(ContentType.VIDEO.toString())) {
			return ContentType.VIDEO;
		}
		if (content.equalsIgnoreCase(ContentType.HTML.toString())) {
			return ContentType.HTML;
		}
		if (content.equalsIgnoreCase(ContentType.TEXT.toString())) {
			return ContentType.TEXT;
		}
		if (content.equalsIgnoreCase(ContentType.TABLE.toString())) {
			return ContentType.TABLE;
		}
		if (content.equalsIgnoreCase(ContentType.GIF.toString())) {
			return ContentType.GIF;
		}
		if (content.equalsIgnoreCase(ContentType.BROWSER.toString())) {
			return ContentType.BROWSER;
		}
		if (content.equalsIgnoreCase(ContentType.REALESTATE_LISTING.toString())) {
			return ContentType.REALESTATE_LISTING;
		}
		return ContentType.OTHER;
	}

	public String getPath() {
		if (this == ContentType.IMAGE || this == ContentType.GIF) {
			return Settings.IMAGE_DIRECTORY;
		} else if (this == ContentType.VIDEO) {
			return Settings.VIDEO_DIRECTORY;
		} else if (this == ContentType.BROWSER) {
			return Settings.HTML_DIRECTORY;
		} else if (this == ContentType.HTML) {
			
			return Settings.HTML_DIRECTORY;
			
		} else {
			return "";
		}
	}
};
